package com.xcy.service.Impl;

import com.xcy.dao.ISys_attachmentDao;
import com.xcy.dto.Sys_attachment;
import com.xcy.service.ISys_attachmentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service("sys_attachmentService")
public class Sys_attachmentServiceImpl implements ISys_attachmentService {
    @Resource
    private ISys_attachmentDao sys_attachmentDao;

    public Sys_attachment getSys_attachmentById(int id) {return sys_attachmentDao.queryByPrimaryKey(id);}

    public List<Sys_attachment> getAllSys_attachment() {return  sys_attachmentDao.getAllSys_attachment(); }

    public Sys_attachment querySys_attachmentByParams(Map<String, Object> params){
        return sys_attachmentDao.querySys_attachmentByParams(params);
    }

    public void addSys_attachment(Sys_attachment sys_attachment){ sys_attachmentDao.insertSys_attachment(sys_attachment);}

    public void deleteSys_attachmentById(int id){ sys_attachmentDao.deleteByPrimaryKey(id);}

    public void updateSys_attachment(Sys_attachment sys_attachment){ sys_attachmentDao.updateSys_attachment(sys_attachment);}
}
